<?php

class Application_Form_Upload extends Zend_Form {

    public function init() {
        $this->setMethod("post")
                ->setAttrib('enctype', 'multipart/form-data');

        $photo = new Zend_Form_Element_File('photo');
        $photo->setLabel('Select Image:')
                ->addValidator('IsImage')
                ->addValidator('Extension', false, 'jpg,png,gif')
                ->setAttribs(array('multiple' => 'multiple'))
//                ->setDestination('/var/lib/openshift/5155ee6f4382ecc26a00023f/app-root/runtime/repo/php/uploads')
               // ->setDestination('/var/www/project-tracker/public/data')
                ->setIsArray(true)
                ->setValueDisabled(true);

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel("Upload")
                ->setAttribs(array('class' => 'btn btn-success'));

        $this->addElements(array($photo, $submit));
    }

}

